package inflection;

import java.lang.reflect.Constructor;

public class Inflection01 {

    public static void main(String[] args) throws Exception {

        Class studentClass = Student.class;

        Constructor declaredConstructor = studentClass.getDeclaredConstructor();

        Object o = declaredConstructor.newInstance();
        System.out.println(o);

        Constructor<Student> declaredConstructor1 = studentClass.getDeclaredConstructor(String.class, int.class);
        declaredConstructor1.setAccessible(true);

        Student karly = declaredConstructor1.newInstance("karly", 19);
        System.out.println(karly);


    }
}
